classdef DirectionIdentification 
    properties
    end
    methods
      %% we have to assure that Direction is right
       function Indx = IdentifyDirection(obj, OldVector,eigVects, Dims)
           MaximumOverlap = 0;
           Indx = 0;
           
           
           for i = 1 : Dims
               Overlap = 0;
                for j = 1 : Dims
                    if OldVector(j) == eigVects(j,i)
                        Overlap = Overlap + 1;
                    end
                end
                if Overlap >= MaximumOverlap
                    Indx = i;
                    MaximumOverlap = Overlap;
                end
           end
       end
       
       function [minimum indx] = FindMinIndex(obj, Vc, Dims)
            minimum = min(Vc);
            for i = 1: Dims
                if Vc(i) == minimum
                    indx = i;
                end
            end
        end     
       
    end
end

